﻿namespace MSRI.HelperClasses
{
    using System;

    [Serializable]
    public class DeliveryReportClass
    {
        private Guid _MessageID;
        private DeliveryStatusEnum _Status;

        public DeliveryReportClass()
        {
            this._Status = DeliveryStatusEnum.Sent;
            this._MessageID = Guid.NewGuid();
        }

        public DeliveryReportClass(string[] Fields)
        {
            this.Status = (DeliveryStatusEnum) Convert.ToInt16(Fields[1]);
            this.MessageID = new Guid(Fields[2]);
        }

        public DeliveryReportClass(DeliveryReportClass DeliveryReport)
        {
            this._MessageID = DeliveryReport.MessageID;
            this._Status = DeliveryReport.Status;
        }

        public override string ToString()
        {
            object[] objArray = new object[] { 2.ToString(), Convert.ToChar(Delim.Field), ((int) this.Status).ToString(), Convert.ToChar(Delim.Field), this.MessageID.ToString() };
            return string.Concat(objArray);
        }

        public Guid MessageID
        {
            get
            {
                return this._MessageID;
            }
            set
            {
                this._MessageID = value;
            }
        }

        public DeliveryStatusEnum Status
        {
            get
            {
                return this._Status;
            }
            set
            {
                this._Status = value;
            }
        }
    }
}

